package com.sz.netty.service;

/**
 * Device command service for sending commands to connected devices
 */
public interface DeviceCommandService {
    
    /**
     * Send remote display content command to a device
     * @param deviceId Device ID
     * @param displayContent 3-byte ASCII display content (e.g., "036" as bytes 0x30, 0x33, 0x36)
     * @return true if command was sent successfully, false otherwise
     */
    boolean sendRemoteDisplayContent(String deviceId, String displayContent);
    
    /**
     * Send remote display content command to a device
     * @param deviceId Device ID
     * @param displayContent 3-byte display content
     * @return true if command was sent successfully, false otherwise
     */
    boolean sendRemoteDisplayContent(String deviceId, byte[] displayContent);
    
    /**
     * Send remote display content command to a device and wait for acknowledgment
     * @param deviceId Device ID
     * @param displayContent 3-byte ASCII display content (e.g., "036" as bytes 0x30, 0x33, 0x36)
     * @return true if command was sent successfully and acknowledged, false otherwise
     */
    boolean sendRemoteDisplayContentWithAck(String deviceId, String displayContent);
    
    /**
     * Send remote display content command to a device and wait for acknowledgment
     * @param deviceId Device ID
     * @param displayContent 3-byte display content
     * @return true if command was sent successfully and acknowledged, false otherwise
     */
    boolean sendRemoteDisplayContentWithAck(String deviceId, byte[] displayContent);
    
    /**
     * Check if a device is currently connected
     * @param deviceId Device ID
     * @return true if device is connected, false otherwise
     */
    boolean isDeviceConnected(String deviceId);
    
    /**
     * Get the list of connected devices
     * @return Array of connected device IDs
     */
    String[] getConnectedDevices();
}